﻿<Page x:Class="WpfMedia.SoundPlayerSample"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="SoundPlayerSample">
    <Grid>
        <Button Content="Play" Height="23" HorizontalAlignment="Left" Margin="30,25,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
        <Button Content="PlayAction" Height="23" HorizontalAlignment="Left" Margin="30,71,0,0" Name="button2" VerticalAlignment="Top" Width="75" >
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <EventTrigger.Actions>
                        <SoundPlayerAction Source="a6.wav" />
                    </EventTrigger.Actions>
                </EventTrigger>
            </Button.Triggers>
        </Button>
        <Rectangle Height="77" HorizontalAlignment="Left" Margin="30,122,0,0" Name="rectangle1" Fill="LightCyan" 
                  StrokeThickness="1" Stroke="LightGoldenrodYellow" VerticalAlignment="Top" Width="126" >
            <Rectangle.Triggers>
                <EventTrigger RoutedEvent="Mouse.MouseEnter" >
                    <EventTrigger.Actions>
                        <SoundPlayerAction Source="a6.wav" />
                    </EventTrigger.Actions>
                </EventTrigger>
            </Rectangle.Triggers>
        </Rectangle>
        <Button Content="SystemSound" Height="23" HorizontalAlignment="Left" Margin="174,25,0,0" Name="button3" VerticalAlignment="Top" Width="102" Click="button3_Click" />
        <Button Content="SystemSound" Height="23" HorizontalAlignment="Left" Margin="174,71,0,0" Name="button4" VerticalAlignment="Top" Width="102" >
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <EventTrigger.Actions>
                        <SoundPlayerAction Source="a6.wav" />
                    </EventTrigger.Actions>
                </EventTrigger>
            </Button.Triggers>
        </Button>
    </Grid>
</Page>
